import { getAreaObj, regularRule, uploadType } from '@/utils/util'
export const detailConfig = {
	inline: false,
	showBtn: false,
	labelPosition: 'left',
	column: [
		{ label: '工牌照片', prop: 'workCardPhoto', custome: 'img', span: 24 },
		{ label: '当前所在单位名称', prop: 'unitName', span: 24 },
		{ label: '当前所在单位统一信用代码', prop: 'creditCode', span: 24 },
		{ label: '当前所在单位所在区域', prop: 'unitAddress', span: 24 },
		{ label: '从业人员姓名', prop: 'practitionersName', span: 12 },
		{ label: '出生日期', prop: 'birthday', span: 12 },
		{ label: '联系方式', prop: 'phone', span: 12 },
		{ label: '证件类型', prop: 'certificateTypeLabel', span: 12 },
		{ label: '证件号码', prop: 'idCard', span: 12 },
		{ label: '户籍地区', prop: 'crAreasName', span: 24 },
		{ label: '户籍地址', prop: 'crAddress', span: 24 },
		{ label: '现居地区', prop: 'areasName', span: 24 },
		{ label: '现居地址', prop: 'address', span: 24 },
		{ label: '户籍地邮政编码', prop: 'postalCode', span: 8 },
		{ label: '户籍地行政区划代码', prop: 'crZoningCode', span: 8 },
		{
			label: '户籍性质',
			prop: 'natureLabel',
			span: 8,
		},
		{
			label: '服务状态',
			prop: 'serviceStateLabel',
			span: 8,
		},
		{
			label: '婚姻状况',
			prop: 'maritalStatusDictLabel',
			span: 8,
		},
		{
			label: '政治面貌',
			prop: 'politicsAspectLabel',
			span: 8,
		},
		{
			label: '文化程度',
			prop: 'cultureDegreeLabel',
			span: 8,
		},
		{
			label: '职业',
			prop: 'occupationTypeLabel',
			span: 4,
		},
		{
			label: '职业类型说明',
			prop: 'occupationTypeDescription',
			span: 24,
		},

		{
			label: '健康状态',
			prop: 'healthyStateLabel',
			span: 12,
		},
		{
			label: '工作类型',
			prop: 'workTypeLabel',
			span: 12,
		},
	],
	customeHeader: {
		type: 'CardTwo',
		title: 'practitionersName',
		avatar: 'staffPhoto',
		tipList: [{ prop: 'phone', type: 'tip-success', label: '联系电话' }],
		tagList: [
			{ prop: 'healthyStateLabel', custome: 'tag', type: 'success', label: '健康状态' },
			{ prop: 'workTypeLabel', custome: 'tag', type: 'success', label: '工作类型' },
			{ prop: 'unitName', type: 'success', label: '所在单位' },
		],
		menuBtn: [
			{
				icon: 'delete',
				label: '删除从业人员',
				type: 'danger',
				operate: 'delete',
				auth: 'view_dpFoundationPractitioners_del',
				text: false,
				show: true,
				plain: true,
			},
		],
	},
}

// 基础
export const BaseFormConfig = {
	inline: false,
	showBtn: false,
	labelPosition: 'left',
	column: [
		{
			uploadTip: '员工照片',
			prop: 'staffPhoto',
			type: 'upload',
			showFileList: false,
			limit: 1,
			multiple: false,
			span: 12,
		},
		{
			uploadTip: '工牌照片',
			prop: 'workCardPhoto',
			type: 'upload',
			showFileList: false,
			limit: 1,
			multiple: false,
			span: 12,
		},
		{
			label: '当前所在单位名称',
			prop: 'unitName',
			maxlength: '20',
			changeField: true,
			showWordLimit: true,
			type: 'text',
			labelPosition: 'top',
			rules: [{ required: true, message: '请输入当前所在单位名称' }],
			span: 8,
		},
		{
			label: '当前所在单位统一信用代码',
			prop: 'creditCode',
			maxlength: '18',
			labelPosition: 'top',
			changeField: true,
			showWordLimit: true,
			type: 'text',
			rules: [{ required: true, message: '请输入当前所在单位统一信用代码' }],
			span: 8,
		},
		{
			label: '当前所在单位所在区域',
			prop: 'unitAreas',
			labelPosition: 'top',
			propName: 'unitAddress',
			type: 'AplidAreaSelect',
			rules: [{ required: true, message: '请选择当前所在单位所在区域' }],
			span: 8,
			changeField: true,
		},
		{
			label: '从业人员姓名',
			prop: 'practitionersName',
			maxlength: '20',
			changeField: true,
			showWordLimit: true,
			type: 'text',
			rules: [{ required: true, message: '请输入从业人员姓名' }],
			span: 8,
		},
		{
			label: '证件类型',
			prop: 'certificateType',
			propName: 'certificateTypeLabel',
			type: 'remoteSelect',
			code: 'ID_CARD_TYPE',
			api: 'getDictItemList',
			filterKey: 'value',
			changeField: true,
			multiple: false,
			rules: [{ required: true, message: '请选择证件类型' }],
			span: 8,
		},
		{
			label: '证件号码',
			prop: 'idCard',
			maxlength: '18',
			changeField: true,
			showWordLimit: true,
			type: 'text',
			rules: [{ required: true, message: '请输入证件号码' }],
			span: 8,
		},
		{
			label: '民族',
			prop: 'national',
			propName: 'nationalLabel',
			type: 'remoteSelect',
			code: 'NATIONALITY',
			api: 'getDictItemList',
			filterKey: 'value',
			multiple: false,
			span: 8,
		},
		{
			label: '政治面貌',
			prop: 'politicsAspect',
			propName: 'politicsAspectLabel',
			type: 'remoteSelect',
			code: 'POLITICAL_STATUS',
			api: 'getDictItemList',
			filterKey: 'value',
			multiple: false,
			span: 8,
		},
		{
			label: '文化程度',
			prop: 'cultureDegree',
			propName: 'cultureDegreeLabel',
			type: 'remoteSelect',
			code: 'EDUCATION_DEGREE',
			api: 'getDictItemList',
			filterKey: 'value',
			multiple: false,
			span: 8,
		},
		{
			label: '婚姻状况',
			prop: 'maritalStatusDict',
			propName: 'maritalStatusDictLabel',
			type: 'remoteSelect',
			code: 'MARITAL_STATUS',
			api: 'getDictItemList',
			filterKey: 'value',
			multiple: false,
			span: 8,
		},
		{
			label: '服务状态',
			prop: 'serviceState',
			propName: 'serviceStateLabel',
			type: 'remoteSelect',
			code: 'SERVICE_STATE',
			api: 'getDictItemList',
			filterKey: 'value',
			multiple: false,
			changeField: true,
			rules: [{ required: true, message: '请选择服务状态' }],
			span: 8,
		},
		{
			label: '联系方式',
			prop: 'phone',
			maxlength: '11',
			changeField: true,
			showWordLimit: true,
			rules: [{ required: true, message: '请输入联系方式' }],
			type: 'text',
			span: 8,
		},
		{
			label: '户籍性质',
			prop: 'nature',
			propName: 'natureLabel',
			type: 'remoteSelect',
			code: 'NATURE',
			api: 'getDictItemList',
			filterKey: 'value',
			multiple: false,
			rules: [{ required: true, message: '请选择户籍性质' }],
			span: 8,
		},
		{
			label: '户籍地区',
			prop: 'crAreas',
			propName: 'crAreasName',
			propOther: 'crZoningCode',
			type: 'AplidAreaSelect',
			rules: [{ required: true, message: '请选择户籍地区' }],
			span: 8,
		},
		{
			label: '户籍地行政区划代码',
			prop: 'crZoningCode',
			type: 'text',
			maxlength: '12',
			showWordLimit: true,
			disabled: true,
			// rules: [{ validator: regularRule.areaCode, message: '请输入正确的户籍地行政区划代码' }],
			span: 8,
		},
		{
			label: '户籍地邮政编码',
			prop: 'postalCode',
			type: 'text',
			maxlength: '6',
			showWordLimit: true,
			rules: [{ validator: regularRule.postalCode, message: '请输入正确的户籍地邮政编码' }],
			span: 8,
		},

		{
			label: '户籍地址',
			prop: 'crAddress',
			maxlength: '140',
			showWordLimit: true,
			type: 'text',
			span: 8,
		},
		{
			label: '现居地区',
			prop: 'areas',
			propName: 'areasName',
			type: 'AplidAreaSelect',
			rules: [{ required: true, message: '请选择现居地区' }],
			span: 8,
		},
		{
			label: '现居地址',
			prop: 'address',
			maxlength: '140',
			showWordLimit: true,
			type: 'text',
			span: 8,
		},
		{
			label: '职业类型',
			prop: 'occupationType',
			propName: 'occupationTypeLabel',
			type: 'remoteSelect',
			code: 'OCCUPATION_TYPE',
			api: 'getDictItemList',
			filterKey: 'value',
			multiple: false,
			rules: [{ required: true, message: '请选择职业类型' }],
			span: 8,
		},
		{
			label: '职业类型说明',
			prop: 'occupationTypeDescription',
			maxlength: '50',
			showWordLimit: true,
			type: 'text',
			span: 8,
		},
		{
			label: '健康状态',
			prop: 'healthyState',
			propName: 'healthyStateLabel',
			type: 'remoteSelect',
			code: 'HEALTHY_STATE',
			api: 'getDictItemList',
			filterKey: 'value',
			multiple: false,
			span: 8,
		},
		{
			label: '工作类型',
			prop: 'workType',
			propName: 'workTypeLabel',
			type: 'remoteSelect',
			code: 'WORK_TYPE',
			api: 'getDictItemList',
			filterKey: 'value',
			multiple: false,
			changeField: true,
			rules: [{ required: true, message: '请选择工作类型' }],
			span: 8,
		},
	],
}

export const ExtendDetailConfig = {
	label: '扩展信息',
	prop: 'practitioners_extend',
	inline: false,
	showBtn: false,
	labelPosition: 'top',
	column: [
		//--------------------社保缴纳情况 ----------------
		{
			type: 'DividerHtml',
			modelValue: '社保缴纳情况',
			span: 24,
		},
		{
			label: '是否缴纳社保',
			prop: 'paySocialInsurance',
			propName: 'paySocialInsuranceLabel',
			type: 'remoteSelect',
			code: 'COMMON_FLAG',
			api: 'getDictItemList',
			filterKey: 'value',
			multiple: false,
			control: (e, model) => {
				return {
					cardNumber: {
						display: e == 1,
					},
					socialSecurityDate: {
						display: e == 1,
					},
					payProof: {
						display: e == 1,
					},
				}
			},
			span: 8,
		},
		{
			label: '社保卡号',
			prop: 'cardNumber',
			maxlength: '50',
			showWordLimit: true,
			type: 'text',
			span: 8,
		},
		{
			label: '社保时间',
			prop: 'socialSecurityDate',
			type: 'date',
			format: 'YYYY年MM月DD日',
			valueFormat: 'YYYY-MM-DD',
			span: 8,
		},
		{
			label: '社保缴费证明',
			prop: 'payProof',
			type: 'upload',
			fileType: uploadType.fileMetaType,
			listType: 'text',
			labelPosition: 'top',
			showFileList: true,
			limit: 4,
			multiple: true,
			custome: 'file',
			span: 12,
		},
		//--------------------职业证书 ----------------
		{
			type: 'DividerHtml',
			modelValue: '职业证书',
			span: 24,
		},
		{
			label: '是否持证',
			prop: 'isHold',
			propName: 'isHoldLabel',
			code: 'COMMON_FLAG',
			type: 'remoteSelect',
			api: 'getDictItemList',
			filterKey: 'value',
			multiple: false,
			span: 12,
		},

		{
			label: '证书类别',
			prop: 'certificateCategory',
			propName: 'certificateCategoryLabel',
			type: 'remoteSelect',
			code: 'CERTIFICATE_CATEGORY',
			api: 'getDictItemList',
			filterKey: 'value',
			multiple: false,
			custome: 'tag',
			changeField: true,
			span: 12,
		},
		{
			label: '证书编号',
			prop: 'certificateNumber',
			maxlength: '50',
			showWordLimit: true,
			type: 'text',
			changeField: true,
			span: 12,
		},
		{
			label: '证书名称',
			prop: 'certificateName',
			maxlength: '50',
			showWordLimit: true,
			type: 'text',
			changeField: true,
			span: 12,
		},
		{
			uploadTip: '证书照片',
			prop: 'certificatePhoto',
			type: 'upload',
			labelPosition: 'top',
			custome: 'file',
			showFileList: false,
			limit: 1,
			multiple: false,
			changeField: true,
			span: 24,
		},
		{
			label: '颁发单位名称',
			prop: 'issueUnitName',
			maxlength: '50',
			showWordLimit: true,
			type: 'text',
			changeField: true,
			span: 8,
		},
		{
			label: '证书等级',
			prop: 'certificateGrade',
			maxlength: '50',
			showWordLimit: true,
			type: 'text',
			changeField: true,
			span: 8,
		},

		{
			label: '职业证书到期时间',
			prop: 'certificateMaturity',
			type: 'date',
			format: 'YYYY年MM月DD日',
			valueFormat: 'YYYY-MM-DD',
			span: 8,
			changeField: true,
		},
		//--------------------健康证 ----------------
		{
			type: 'DividerHtml',
			modelValue: '健康证',
			span: 24,
		},
		{
			label: '健康证明编号',
			prop: 'proofNumber',
			maxlength: '50',
			showWordLimit: true,
			type: 'text',
			changeField: true,
			span: 6,
			labelPosition: 'top',
		},
		{
			label: '健康证明颁发单位名称',
			prop: 'proofIssueUnitName',
			maxlength: '50',
			showWordLimit: true,
			type: 'text',
			changeField: true,
			span: 6,
			labelPosition: 'top',
		},
		{
			label: '健康证明类别',
			prop: 'proofType',
			propName: 'proofTypeLabel',
			type: 'remoteSelect',
			code: 'PROOF_TYPE',
			api: 'getDictItemList',
			filterKey: 'value',
			multiple: false,
			custome: 'tag',
			changeField: true,
			span: 6,
			labelPosition: 'top',
		},
		{
			label: '健康证到期时间',
			prop: 'maturityTime',
			type: 'date',
			format: 'YYYY年MM月DD日',
			valueFormat: 'YYYY-MM-DD',
			span: 6,
			changeField: true,
			labelPosition: 'top',
		},
		//--------------------体检证明 ----------------
		{
			type: 'DividerHtml',
			modelValue: '体检证明',
			span: 24,
		},
		{
			label: '服务人员体检日期',
			prop: 'checkDate',
			type: 'date',
			format: 'YYYY年MM月DD日',
			valueFormat: 'YYYY-MM-DD',
			span: 6,
			labelPosition: 'top',
		},
		{
			label: '服务人员体检结果说明',
			prop: 'checkResult',
			maxlength: '140',
			showWordLimit: true,
			type: 'text',
			span: 9,
			labelPosition: 'top',
		},
		{
			label: '服务人员健康状况说明',
			prop: 'healthCondition',
			maxlength: '140',
			showWordLimit: true,
			type: 'text',
			span: 9,
			labelPosition: 'top',
		},
	],
}
// 扩展
export const ExtendFormConfig = {
	label: '扩展信息',
	prop: 'practitioners_extend',
	inline: false,
	showBtn: false,
	labelPosition: 'top',
	column: [
		//--------------------社保缴纳情况 ----------------
		{
			type: 'DividerHtml',
			modelValue: '社保缴纳情况',
			span: 24,
		},
		{
			label: '是否缴纳社保',
			prop: 'paySocialInsurance',
			propName: 'paySocialInsuranceLabel',
			type: 'remoteSelect',
			code: 'COMMON_FLAG',
			api: 'getDictItemList',
			filterKey: 'value',
			multiple: false,
			control: (e, model) => {
				return {
					cardNumber: {
						display: e == 1,
					},
					socialSecurityDate: {
						display: e == 1,
					},
					payProof: {
						display: e == 1,
					},
				}
			},
			span: 8,
		},
		{
			label: '社保卡号',
			prop: 'cardNumber',
			maxlength: '50',
			showWordLimit: true,
			type: 'text',
			span: 8,
		},
		{
			label: '社保时间',
			prop: 'socialSecurityDate',
			type: 'date',
			format: 'YYYY年MM月DD日',
			valueFormat: 'YYYY-MM-DD',
			span: 8,
		},
		{
			label: '社保缴费证明',
			prop: 'payProof',
			type: 'upload',
			fileType: uploadType.fileMetaType,
			listType: 'text',
			labelPosition: 'top',
			showFileList: true,
			limit: 4,
			multiple: true,
			custome: 'file',
			span: 12,
		},
		//--------------------职业证书 ----------------
		{
			type: 'DividerHtml',
			modelValue: '职业证书',
			span: 24,
		},
		{
			label: '是否持证',
			prop: 'isHold',
			propName: 'isHoldLabel',
			code: 'COMMON_FLAG',
			type: 'remoteSelect',
			api: 'getDictItemList',
			filterKey: 'value',
			multiple: false,
			span: 6,
		},
		{
			label: '证书编号',
			prop: 'certificateNumber',
			maxlength: '50',
			showWordLimit: true,
			type: 'text',
			changeField: true,
			span: 6,
		},
		{
			label: '证书名称',
			prop: 'certificateName',
			maxlength: '50',
			showWordLimit: true,
			type: 'text',
			changeField: true,
			span: 6,
		},
		{
			label: '证书类别',
			prop: 'certificateCategory',
			propName: 'certificateCategoryLabel',
			type: 'remoteSelect',
			code: 'CERTIFICATE_CATEGORY',
			api: 'getDictItemList',
			filterKey: 'value',
			multiple: false,
			custome: 'tag',
			changeField: true,
			span: 6,
		},
		{
			uploadTip: '证书照片',
			label: '证书照片',
			prop: 'certificatePhoto',
			type: 'upload',
			labelPosition: 'top',
			custome: 'file',
			showFileList: false,
			limit: 1,
			multiple: false,
			changeField: true,
			span: 24,
		},
		{
			label: '颁发单位名称',
			prop: 'issueUnitName',
			maxlength: '50',
			showWordLimit: true,
			type: 'text',
			changeField: true,
			span: 8,
		},
		{
			label: '证书等级',
			prop: 'certificateGrade',
			maxlength: '50',
			showWordLimit: true,
			type: 'text',
			changeField: true,
			span: 8,
		},

		{
			label: '职业证书到期时间',
			prop: 'certificateMaturity',
			type: 'date',
			format: 'YYYY年MM月DD日',
			valueFormat: 'YYYY-MM-DD',
			span: 8,
			changeField: true,
		},
		//--------------------健康证 ----------------
		{
			type: 'DividerHtml',
			modelValue: '健康证',
			span: 24,
		},
		{
			label: '健康证明编号',
			prop: 'proofNumber',
			maxlength: '50',
			showWordLimit: true,
			type: 'text',
			changeField: true,
			span: 6,
		},
		{
			label: '健康证明颁发单位名称',
			prop: 'proofIssueUnitName',
			maxlength: '50',
			showWordLimit: true,
			type: 'text',
			changeField: true,
			span: 6,
		},
		{
			label: '健康证明类别',
			prop: 'proofType',
			propName: 'proofTypeLabel',
			type: 'remoteSelect',
			code: 'PROOF_TYPE',
			api: 'getDictItemList',
			filterKey: 'value',
			multiple: false,
			custome: 'tag',
			changeField: true,
			span: 6,
		},
		{
			label: '健康证到期时间',
			prop: 'maturityTime',
			type: 'date',
			format: 'YYYY年MM月DD日',
			valueFormat: 'YYYY-MM-DD',
			span: 6,
			changeField: true,
		},
		//--------------------体检证明 ----------------
		{
			type: 'DividerHtml',
			modelValue: '体检证明',
			span: 24,
		},
		{
			label: '服务人员体检日期',
			prop: 'checkDate',
			type: 'date',
			format: 'YYYY年MM月DD日',
			valueFormat: 'YYYY-MM-DD',
			span: 6,
		},
		{
			label: '服务人员体检结果说明',
			prop: 'checkResult',
			maxlength: '140',
			showWordLimit: true,
			type: 'text',
			span: 9,
		},
		{
			label: '服务人员健康状况说明',
			prop: 'healthCondition',
			maxlength: '140',
			showWordLimit: true,
			type: 'text',
			span: 9,
		},
		//--------------------从业经历 ----------------
		{
			type: 'DividerHtml',
			modelValue: '从业经历',
			span: 24,
		},
		{
			label: '',
			type: 'dynamicForm',
			// type: 'dynamic',
			prop: 'dp_practitioners_experience',
			span: 24,
			tabType: 'form',
			config: {
				inline: false,
				showBtn: false,
				labelPosition: 'top',
				maxHeight: '30rem',
				addBtn: true,
				delBtn: true,
			},
			column: [
				{
					label: '所属单位',
					prop: 'belongUnit',
					maxlength: '50',
					showWordLimit: true,
					type: 'text',
					span: 8,
				},
				{
					label: '所属部门名称',
					prop: 'departmentName',
					maxlength: '50',
					showWordLimit: true,
					type: 'text',
					span: 8,
				},
				{
					label: '所属单位统一信用代码',
					prop: 'creditCode',
					maxlength: '18',
					showWordLimit: true,
					type: 'text',
					span: 8,
				},
				{
					label: '参加工作日期',
					prop: 'workDate',
					type: 'date',
					format: 'YYYY年MM月DD日',
					valueFormat: 'YYYY-MM-DD',
					span: 8,
				},
				{
					label: '服务人员聘用方式',
					prop: 'hireMode',
					propName: 'hireModeLabel',
					type: 'remoteSelect',
					code: 'HIRE_MODE',
					api: 'getDictItemList',
					filterKey: 'value',
					multiple: false,
					custome: 'tag',
					span: 8,
				},
				{
					label: '入职日期',
					prop: 'entryDate',
					type: 'date',
					format: 'YYYY年MM月DD日',
					valueFormat: 'YYYY-MM-DD',
					span: 8,
				},
				{
					label: '离职/退休日期',
					prop: 'dimissionDate',
					type: 'date',
					format: 'YYYY年MM月DD日',
					valueFormat: 'YYYY-MM-DD',
					span: 8,
				},
				{
					label: '离职原因说明',
					prop: 'dimissionCause',
					maxlength: '140',
					showWordLimit: true,
					type: 'text',
					span: 8,
				},
				{
					label: '工作内容',
					prop: 'workContent',
					maxlength: '140',
					showWordLimit: true,
					type: 'text',
					span: 8,
				},
			],
		},
		//--------------------培训记录 ----------------
		{
			type: 'DividerHtml',
			modelValue: '培训记录',
			span: 24,
		},
		{
			label: '',
			type: 'dynamic',
			prop: 'dp_training_record',
			span: 24,
			tabType: 'form',
			column: [
				{
					label: '培训单位名称',
					prop: 'trainingUnitName',
					maxlength: '50',
					showWordLimit: true,
					type: 'text',
					span: 8,
				},
				{
					label: '培训日期',
					prop: 'trainingDate',
					type: 'date',
					format: 'YYYY年MM月DD日',
					valueFormat: 'YYYY-MM-DD',
					span: 8,
				},
				{
					label: '培训内容',
					prop: 'trainingContent',
					maxlength: '140',
					showWordLimit: true,
					type: 'text',
					span: 8,
				},
			],
		},
		//--------------------享受补贴信息 ----------------
		{
			type: 'DividerHtml',
			modelValue: '享受补贴信息',
			span: 24,
		},
		{
			label: '',
			type: 'dynamic',
			prop: 'dp_subsidy_info',
			span: 24,
			tabType: 'table',
			column: [
				{
					label: '补贴类型',
					prop: 'subsidyType',
					maxlength: '50',
					showWordLimit: true,
					type: 'text',
					span: 8,
				},
				{
					label: '补贴标准',
					prop: 'subsidyStandard',
					maxlength: '50',
					showWordLimit: true,
					type: 'text',
					span: 8,
				},
				{
					label: '补贴金额',
					prop: 'subsidyAmount',
					append: '元',
					rules: [
						{ required: true, message: '请选择现居地区' },
						{ pattern: regularRule.fixedTwoNum, message: '请输入正确的金额' },
					],
					type: 'input',
					span: 8,
				},
				{
					label: '接受补贴日期',
					prop: 'subsidyDate',
					type: 'date',
					format: 'YYYY年MM月DD日',
					valueFormat: 'YYYY-MM-DD',
					span: 8,
				},
			],
		},
		//--------------------奖/处罚信息 ----------------
		{
			type: 'DividerHtml',
			modelValue: '奖/处罚信息',
			span: 24,
		},
		{
			label: '',
			type: 'dynamic',
			prop: 'dp_reward_punishment_info',
			span: 24,
			tabType: 'form',
			column: [
				{
					label: '类型',
					prop: 'rewardState',
					propName: 'rewardStateLabel',
					type: 'remoteSelect',
					code: 'REWARD_STATE',
					api: 'getDictItemList',
					filterKey: 'value',
					multiple: false,
					custome: 'dict',
					dataType: 'string',
					span: 8,
				},
				{
					label: '日期',
					prop: 'punishmentDate',
					type: 'date',
					format: 'YYYY年MM月DD日',
					valueFormat: 'YYYY-MM-DD',
					span: 8,
				},
				{
					label: '原因',
					prop: 'punishmentCause',
					maxlength: '140',
					showWordLimit: true,
					type: 'text',
					span: 8,
				},
				{
					label: '内容',
					prop: 'punishmentContent',
					maxlength: '140',
					showWordLimit: true,
					type: 'text',
					span: 8,
				},
				{
					label: '单位名称',
					prop: 'punishmentUnitName',
					maxlength: '50',
					showWordLimit: true,
					type: 'text',
					span: 8,
				},
			],
		},
	],
}

const tableConfig = {
	stripe: true,
	border: true,
	// maxHeight: '80vh',
	columns: [
		{type:'selection',fixed:'left',reserveSelection:true},
		{ label: '单位所在地区', prop: 'unitAddress' },
		{ label: '单位名称', prop: 'unitName' },
		{ label: '身份证号', prop: 'idCard', plusXing: '2,2' },
		{ label: '姓名', prop: 'practitionersName' },
		{ label: '联系方式', prop: 'phone', plusXing: '5,2' },
		{
			label: '专职',
			prop: 'workTypeLabel',
			span: 8,
		},

		{
			label: '职业类型',
			prop: 'occupationTypeLabel',
		},
		{
			label: '文化程度',
			prop: 'cultureDegreeLabel',
		},
		{
			label: '是否持证',
			prop: 'isHold',
      custome:'tag',
      dicData:[
        {label:'已持证',value:1,type:'success'},
        {label:'未持证',value:0,type:'info'},
      ],
			span: 8,
		},
		{
			label: '证件名称',
			prop: 'certificateName',
		},
		{
			label: '在职状态',
			prop: 'serviceStateLabel',
			span: 8,
		},
		{
			label: '操作',
			prop: 'menu',
			width: 300,
			fixed: 'right',
		},
	],
}
export const api = {
	index: 'view_dpFoundationPractitioners_page',
	count:"view_practitioners_pageCount",
	edit: 'view_dpServiceProvider_edit',
	detail: 'view_dpFoundationPractitioners_view',
	delete: 'view_dpFoundationPractitioners_del',
	// import: 'view_dpFoundationPractitioners_import',
	// export: 'view_dpFoundationPractitioners_exportAll',
}
export const baseConfig = {
	pageName: '养老从业人员',
	rowKey: 'id',
	addLabel: '采集数据',
	tipLabel: 'practitionersName',
	dictcodes: [
		'REWARD_STATE',
		'HIRE_MODE',
		'WORK_TYPE',
		'HEALTHY_STATE',
		'NATURE',
		'SERVICE_STATE',
		'COMMON_FLAG',
		'ID_CARD_TYPE',
		'NATIONALITY',
		'POLITICAL_STATUS',
		'EDUCATION_DEGREE',
		'MARITAL_STATUS',
		'MARITAL_STATUS',
		'OCCUPATION_TYPE',
		'CERTIFICATE_CATEGORY',
		'PROOF_TYPE',
		'OSF_TASK_TYPE',
		'OST_TASK_LEVEL'
	],
	// exportMqTopic: '/ning/export/',
	exportMqTopic: [
		{
			topic: '/ning/export/dpFoundationPractitioners/',
			label: '基础数据',
			code: 2007,
			po: 'dpFoundationPractitionersPO',
		},
		{
			topic: '/ning/export/dpFoundationPractitionersExtend/',
			label: '扩展信息',
			code: 2008,
			po: 'dpFoundationPractitionersExtendPO',
		},
		{
			topic: '/ning/export/dpPractitionersExperience/',
			label: '从业经历',
			code: 2009,
			po: 'dpPractitionersExperiencePO',
		},
		{
			topic: '/ning/export/dpRewardPunishmentInfo/',
			label: '奖/处罚信息',
			code: 2012,
			po: 'dpRewardPunishmentInfoPO',
		},
		{
			topic: '/ning/export/dpSubsidyInfo/',
			label: '享受补贴信息',
			code: 2011,
			po: 'dpSubsidyInfoPO',
		},
		{
			topic: '/ning/export/dpTrainingRecord/',
			label: '培训记录',
			code: 2010,
			po: 'dpTrainingRecordPO',
		},
	],
	api,
	auth: {
		index: 'view_dpFoundationPractitioners_page',
		// add: 'view_dpFoundationPractitioners_gather',
		edit: 'view_dpServiceProvider_edit',
		detail: 'view_dpFoundationPractitioners_view',
		delete: 'view_dpFoundationPractitioners_del',
		// import: 'view_dpFoundationPractitioners_import',
		// export: 'view_dpFoundationPractitioners_export',
		// mulitSet: 'mulitSet',
	},
	menuBtn: [
		{
			icon: 'editor',
			label: '查看档案',
			type: 'primary',
			operate: 'Archives',
			auth: 'sys_role_edit',
			text: true,
			show: true,
		},
	],
	dialogConfig: {
		width: '90%',
		// fullscreen: true
	},
	detailConfig,
	searchConfig: {
		inline: true,
		showBtn: true,
		labelPosition: 'left',
		column: [
			{
				label: '证件号码',
				prop: 'idCard',
				type: 'input',
				span: 6,
			},
			{
				label: '单位地区',
				prop: 'unitAreas',
				propName: 'unitAddress',
				type: 'AplidAreaSelect',
				span: 6,
			},
			{
				label: '姓名',
				prop: 'practitionersName',
				type: 'input',
				span: 6,
			},
			{
				label: '联系方式',
				prop: 'phone',
				type: 'input',
				span: 6,
			},
			{
				label: '职业类型',
				prop: 'occupationType',
				type: 'remoteSelect',
				code: 'OCCUPATION_TYPE',
				api: 'getDictItemList',
				filterKey: 'value',
				multiple: false,
				span: 6,
			},
			{
				label: '所属单位',
				prop: 'unitName',
				type: 'input',
				span: 6,
			},
			{
				label: '文化程度',
				prop: 'cultureDegree',
				type: 'remoteSelect',
				code: 'EDUCATION_DEGREE',
				api: 'getDictItemList',
				filterKey: 'value',
				multiple: false,
				span: 6,
			},
			{
				label: '是否持证',
				prop: 'isHold',
				code: 'COMMON_FLAG',
				type: 'remoteSelect',
				api: 'getDictItemList',
				filterKey: 'value',
				multiple: false,
				span: 6,
			},
		],
	},
	tableConfig,
	paramsObj: {
		code: 2007,
	},
	beforeOnLoadFormate: async (params) => {
		const unitAreaIds: any = getAreaObj(params.unitAreas, 'unit')
		const unitAreaNames: any = getAreaObj(params.unitAddress, 'unit')
		let dpFoundationPractitionersExtendPO = {
			isHold: params.isHold,
			isHoldLabel: params.isHoldLabel,
		}
		return Promise.resolve({
			...params,
			...unitAreaIds,
			...unitAreaNames,
			dpFoundationPractitionersExtendPO,
			unitAreas: undefined,
			unitAreasName: undefined,
		})
	},
	onLoadFormate: async (arr) => {
		const tableData = arr.map((item) => {
			const unitAddress: any = getAreaObj(item, 'unit', 'set')
			return {
				...(item.dpFoundationPractitionersExtendPO || {}),
				...item,
				unitAddress: unitAddress.names,
			}
		})
		return Promise.resolve(Object.freeze(tableData))
	},
}
